runOnStartup(async runtime => {
    runtime.addEventListener("tick", () => tick())
    runtime.getLayout("MainLevel").addEventListener("afterlayoutstart", () => init())
});
function tick() {
    if (runtime.layout.name != "MainLevel") return;
    Arrow_ArrowShow.ArrowShow()
}
function init() {
    Arrow_ArrowShow.ArrowInit()
}
globalThis.Arrow_ArrowShow = {
    ArrowInit: function () {
        for (let AllArrow of runtime.objects.Arrow.instances()) {
            /**@type {ISpriteInstance} */
            let getArrow = AllArrow
            getArrow.opacity = 0
        }
    },
    ArrowShow: function () {
        for (let ArrowTipPint of runtime.objects.arrowTipPoint.instances()) {
            /**@type {ISpriteInstance} */
            let getArrowTipPoint = ArrowTipPint
            for (let allDuck of runtime.objects.DuckObject.instances()) {
                allDuck.zElevation=1
                if (getArrowTipPoint.testOverlap(allDuck)) {
                    if (allDuck.instVars.state == "go") {
                        for (let AllArrow of runtime.objects.Arrow.instances()) {
                            /**@type {ISpriteInstance} */
                            let getArrow = AllArrow
                            if (getArrow.instVars.id == getArrowTipPoint.instVars.id) {
                                getArrow.opacity = 1
                                setTimeout(function () {
                                    getArrow.opacity = 0
                                }, 1000)
                            }
                        }
                    }
                }
            }
        }
    }
}
export default Arrow_ArrowShow